from rpyc import Service
from util.config import TushareConfig
import tushare as ts


class BaseService(Service):

    def __init__(self, **kwargs):
        super().__init__(**kwargs)
        ts.set_token(TushareConfig().token)
        self.ts = ts
        self.pro = ts.pro_api()

    def on_connect(self, conn):
        pass

    def on_disconnect(self, conn):
        pass


